<?php
namespace app\user\validate\user;

use think\Validate;

/**
 * 订单验证
 */
class Order extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'    =>    ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'date'     => 'in:1week,1month,3month,6month,this_year,earlier',
    ];

    protected $field = [
        'date'     => '时间',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名'    =>    '错误信息'
     *
     * @var array
     */
    protected $message = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'orders'    => ['date'],
    ];

}
